package wsi.gui.resolve;

import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;

import org.rygh.gui.comp.Button;
import org.rygh.gui.comp.Label;
import org.rygh.gui.model.presenter.FPresenter;
import org.rygh.gui.view.HView;

public class ResolveTopView extends HView {

	private final Label upLabel = new Label("Information");
	private final Label downLabel = new Label("Precision");

	public ResolveTopView(FPresenter presenter) {
		super(presenter);

		init();
	}

	public Label getDownLabel() {
		return downLabel;
	}

	public Label getUpLabel() {
		return upLabel;
	}

	private void init() {
		setBackgroundColor("#336699");
		view.setAlignment(Pos.CENTER);
		view.setPrefHeight(60);
		view.setSpacing(10);
		view.setPadding(new Insets(0, 20, 0, 20));

		VBox vbox = new VBox(6);
		vbox.setAlignment(Pos.CENTER_LEFT);

		upLabel.setWhite();
		downLabel.setWhite();
		vbox.getChildren().add(upLabel);
		vbox.getChildren().add(downLabel);

		HBox.setHgrow(vbox, Priority.ALWAYS);
		add(vbox);
		addGlue();

		add(new Button("Auto Judge", presenter, "judgeAuto"));
		add(new Button("Judge All", presenter, "judge"));
		add(new Button("Precision", presenter, "precision"));
	}

}
